package com.cssiot.weixin;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class Mytask1 extends TimerTask{

	@Override
	public void run() {
		System.out.println("5 秒之后执行的定时器");
		
	} 

 public static void main(String[] args) {
	 Timer timer = new Timer( ) ;

//	 timer.schedule(new Mytask1( ) ,5000);
	 timer.schedule(new Mytask1( ) ,5000,1000) ;
	 timer.schedule(new Mytask1( ) ,new Date(),1000) ;
//	 timer.schedule(new Mytask1( ) ,new Date() , 1000 * 60) ; 
}

}